/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
 * Description: freescale qbman driver Vendor Hooks
 */

#ifdef CONFIG_NETBIOS_FSL_QBMAN_SPEC

#ifndef FSL_QBMAN_EXT_H
#define FSL_QBMAN_EXT_H
#include "dpaa_sys.h"

int trace_fsl_bman_probe(dma_addr_t *fbpr_a, size_t *fbpr_sz);
int trace_fsl_bman_probe_pool(struct device *dev, u32 *addr, u16 *cnt);
int trace_fsl_qman_probe_pool(struct device *dev, u16 *addr, int *cnt);
int trace_fsl_qman_probe_cgrid(struct device *dev, u32 *addr, int *cnt);
int trace_fsl_qman_probe_fqid(struct device *dev, struct gen_pool *qm_fqalloc);
int trace_fsl_qman_probe(dma_addr_t *fqd_a, size_t *fqd_sz,
						dma_addr_t *pfdr_a, size_t *pfdr_sz);
int trace_bman_portal_probe(struct device *dev, void **addr_virt_ce,
				void *addr_virt_ci, struct resource *addr_phy);
int trace_qman_portal_probe(struct device *dev, void **addr_virt_ce,
							struct resource *addr_phy);
int trace_qbman_init_private_mem(struct device *dev, int idx, dma_addr_t *addr,
							size_t *size);
#endif

#else

struct device;
struct gen_pool;
struct resource;

static inline int trace_fsl_bman_probe(dma_addr_t *fbpr_a, size_t *fbpr_sz)
{
	return 0;
}
static inline int trace_fsl_bman_probe_pool(struct device *dev, u32 *addr, u16 *cnt)
{
	return 0;
}
static inline int trace_fsl_qman_probe_pool(struct device *dev, u16 *addr, int *cnt)
{
	return 0;
}
static inline int trace_fsl_qman_probe_cgrid(struct device *dev, u32 *addr, int *cnt)
{
	return 0;
}
static inline int trace_fsl_qman_probe_fqid(struct device *dev, struct gen_pool *qm_fqalloc)
{
	return 0;
}
static inline int trace_fsl_qman_probe(dma_addr_t *fqd_a, size_t *fqd_sz,
						dma_addr_t *pfdr_a, size_t *pfdr_sz)
{
	return 0;
}
static inline int trace_bman_portal_probe(struct device *dev, void **addr_virt_ce,
						void *addr_virt_ci, struct resource *addr_phy)
{
	return 0;
}
static inline int trace_qman_portal_probe(struct device *dev, void **addr_virt_ce,
							struct resource *addr_phy)
{
	return 0;
}
static inline int trace_qbman_init_private_mem(struct device *dev, int idx,
							dma_addr_t *addr, size_t *size)
{
	return 0;
}
#endif
